package com.pengliu.config.security;

import java.util.List;
import java.util.Set;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import com.pengliu.common.bean.SysAuth;
import com.pengliu.common.bean.SysRole;
import com.pengliu.common.bean.SysUser;


public class SecurityDetails extends SysUser implements UserDetails{
	/**
	 * 登陆附带信息
	 */
	private static final long serialVersionUID = 1L;
	
	//权限名集合
	private Set<GrantedAuthority> authorities;
	//账号未过期
	private boolean accountNonExpired = true;
	//账号未锁定
	private boolean accountNonLocked = true;
	//是否验证通过
	private boolean credentialsNonExpired = true;
	//是否启用
	private boolean enabled = true;
	//角色信息
	private SysRole sysRole;
	//权限菜单URL集合
	private List<SysAuth> listSysAuth;
	
	
	public Set<GrantedAuthority> getAuthorities() {
		return authorities;
	}
	public void setAuthorities(Set<GrantedAuthority> authorities) {
		this.authorities = authorities;
	}
	public boolean isAccountNonExpired() {
		return accountNonExpired;
	}
	public void setAccountNonExpired(boolean accountNonExpired) {
		this.accountNonExpired = accountNonExpired;
	}
	public boolean isAccountNonLocked() {
		return accountNonLocked;
	}
	public void setAccountNonLocked(boolean accountNonLocked) {
		this.accountNonLocked = accountNonLocked;
	}
	public boolean isCredentialsNonExpired() {
		return credentialsNonExpired;
	}
	public void setCredentialsNonExpired(boolean credentialsNonExpired) {
		this.credentialsNonExpired = credentialsNonExpired;
	}
	public boolean isEnabled() {
		return enabled;
	}
	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}
	public SysRole getSysRole() {
		return sysRole;
	}
	public void setSysRole(SysRole sysRole) {
		this.sysRole = sysRole;
	}
	public List<SysAuth> getListSysAuth() {
		return listSysAuth;
	}
	public void setListSysAuth(List<SysAuth> listSysAuth) {
		this.listSysAuth = listSysAuth;
	}
}
